<?php
/**
 * Created by PhpStorm.
 * User: vanity
 * Date: 2017/5/4
 * Time: 15:51
 */
namespace App\Services;

use Illuminate\Support\Facades\DB;
class navigationService
{
    public function getNav()
    {
        $nav = DB::table('navigation')->where('status','1')->orderby('sequence','DESC')->get();
        $html = '<ul class="nav navbar-nav navbar-right">';
        foreach($nav as $value){
            $html .='<li class="nav_link"><a href="'.$value->url.'" target="_blank">'.$value->name.'</a></li>';
        }
        $html .='</ul>';
        return $html;
    }
}